package com.xxxx.yebserver.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.export.styler.ExcelExportStylerBorderImpl;
import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;

import com.xxxx.yebserver.common.validate.InsertGroup;
import com.xxxx.yebserver.common.validate.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 
 * </p>
 *
 * @author cxq
 * @since 2021-06-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_position")
@ApiModel(value="Position对象", description="")
public class Position implements Serializable {

    private static final long serialVersionUID = 1L;

    @Excel(name = "id",width = 20)
    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @NotNull(message = "id不能为空",groups = {UpdateGroup.class})
    private Long id;

    @Excel(name = "职位名称")
    @ApiModelProperty(value = "职位名称")
    @NotBlank(message = "职位名称不能为空",groups = {InsertGroup.class,UpdateGroup.class})
    private String name;

    @Excel(name = "创建时间", format = "yyyy-MM-dd")
    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @Excel(name="更新时间",format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @Excel(name="是否启用【1启用 2停用】",replace = {"启用_1","停用_2"})
    @ApiModelProperty(value = "是否启用【1启用 2停用】")
    private Integer status;


}
